package wang.yang.model;

import lombok.Getter;

/**
 * @author wang
 */
@Getter
public final class HostAndPort {
    private final String host;
    private final int port;

    public HostAndPort(String ip) {
        int splitSymbolIdx = ip.indexOf(":");
        host = ip.substring(0, splitSymbolIdx);
        port = Integer.parseInt(ip.substring(splitSymbolIdx + 1));
    }
}
